Known bugs ~~~~~~~~~~ * Mangler is not rock solid. Your file should at least pass the Borland compiler, before you have a chance that mangler doesn't choke on it. There are files which I know which broke mangler although I have not got that files in hand so I could not fix mangler. You have a 0.8 probability that mangler mangles your file. Please report errors or send me files that mangler does not handle. * When using externals like {$L InitCrt.obj} {$F+} Procedure ReInitCrt;external; and InitCrt.obj references variables in a unit, you can mangle but not compile this unit because Mangler does not know that the .obj references variables or procedures in the unit and that it therefore should leave them untouched. The chance that mangler ever will be modified for this circumstances is nil. Fix: if possible turn the .obj to assembler and instead of making an external routine, make a basm routine. * The most stable source code manglers have to parse compiler directives. This one does not, so some source code will be mangled incorrectly or not at all. Note that almost all source using compiler directives will compile. The following for example will not: procedure dv_TObject.Int15_p0_r0(axValue : word); {$IFNDEF DPMI} assembler; {$ENDIF} {$IFDEF DPMI} begin {* do some stuff *} end; {$ELSE} asm {* do some asm stuff *} end; {$ENDIF} Rewriting this to: {$IFDEF DPMI} procedure dv_TObject.Int15_p0_r0(axValue : word); begin {* do some stuff *} end; {$ELSE} procedure dv_TObject.Int15_p0_r0(axValue : word); assembler; asm {* do some asm stuff *} end; {$ENDIF} will make it compile correctly. Thefollowing code cannot be mangled too: {$IFDEF VER60} procedure Demo(s : string); {$ENDIF} {$IFDEF VER70} procedure Demo(w : word); {$ENDIF} Again the same variant as the previous two cannot be mangled: {$IFOPT N+} Function FormatF(const Mask : TbxMaskStr; Flt : Double; DP : Integer): String; {$ELSE} Function FormatF(const Mask : TbxMaskStr; Flt : Real; DP : Integer): String; {$ENDIF} Fix as the first variant. * $I directives are currently ignored. All directives are still included in the mangled file but include files are not mangled yet. I want to add this feature when mangler is starting to stabelize. * not all source code can be mangled correctly. Take the following code as an example: implementation uses A; type b = object(parent) {* object parent is defined in unit A *} procedure Demo; end; var a : integer; procedure b.demo; begin a := 10; end; If object parent contains an attribute a, this file will be mangled incorrectly because Mangler does not know that a was defined in parent. Such pitfalls only applies to objects. A 100% stable mangler therefore has to be able to read .TPU files. I will not add this feature, but maybe I will add the ability to read interface sections of the source code of other units. * The following is a real bug, maybe I fix it for version 1.40 unit Test; interface procedure Something(P : pointer); implementation type PSomeData = ^TSomeData; TSomeData = record First : word; Second: word; end; procedure Something(P : pointer); var MyP : PSomeData absolute P; begin MyP^.First := 1; { <== these two dereferenced field names } MyP^.Second := 2; { <== are not mangled. } end; end. Sorry about this, it doesn't seem to common however in source files Unknown bugs ~~~~~~~~~~~~ Lots of bugs sit undetected in Mangler. Escuse me for that, but writing a Mangler is an awful lot like writing a compiler. Would anybody be so kind to report any error to me? If you send a bug report include the source that failed to be mangled correctly with the message mangler gave.